/* 主菜单样式 */
#mainMenu {
    font-family: Arial, sans-serif;
    text-align: center;
    margin-top: 100px;
}

#startRace {
    padding: 15px 30px;
    font-size: 18px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#startRace:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#speedSlider {
    width: 300px;
    margin: 0 10px;
}

/* 赛道样式 */
#raceTrack {
    border: 1px solid black;
    background-color: #f0f0f0;
}

/* 比赛信息面板 */
#raceInfo {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 300px;
    background: rgba(255,255,255,0.8);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

#raceTable {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
}

#raceTable th {
    background: #333;
    color: white;
    padding: 8px;
    text-align: left;
}

#raceTable td {
    padding: 6px;
    border-bottom: 1px solid #ddd;
}

#raceTable tr:nth-child(even) {
    background: #f2f2f2;
}

#raceTable tr:hover {
    background: #e6e6e6;
}

/* 进站相关样式 */
#pitButton {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    cursor: pointer;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-transform: uppercase;
}

#pitButton:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

#pitButton:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#pitButton:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#PitBack {
    /* 取消按钮 */
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    cursor: pointer;
    background-color: red;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-transform: uppercase;
}

#PitBack:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

#PitBack:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.choseTireButton {
    padding: 10px 20px;
    margin: 5px;
    cursor: pointer;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.choseTireButton:hover {
    background-color: #2980b9;
}

.choseTireButton:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#pitPanel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    display: none;
    z-index: 100;
}

#pitPanel button {
    margin: 5px;
    padding: 10px 20px;
    cursor: pointer;
}

/* 其他元素样式 */
.time-diff {
    color: #666;
    font-size: 0.9em;
}

.player-row {
    font-weight: bold;
    background: #ffe6e6 !important;
}

.sort-controls {
    margin-bottom: 10px;
    display: flex;
    gap: 5px;
}

.sort-controls button {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    background: #e0e0e0;
    cursor: pointer;
}

.sort-controls button.active {
    background: #333;
    color: white;
}

#pitTimeDisplay {
    position: absolute;
    bottom: 60px;
    right: 20px;
    background: rgba(255,255,255,0.8);
    padding: 10px;
    border-radius: 8px;
    display: none;
}

#backToMenu {
    position: absolute;
    bottom: 20px;
    left: 20px;
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#backToMenu:hover {
    background-color: #2980b9;
}